<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="headerFragment(title,active)">
    <meta charset="utf-8"/>
    <title>
        <th:block th:text="${title!=null?title:'后台管理'}"></th:block>
    </title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta content="Coderthemes" name="author"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <link th:href="@{/back/css/bootstrap.min.css}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/back/css/font-awesome.min.css}" rel="stylesheet"/>
    <link th:href="@{/back/css/style.min.css}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/back/css/sweetalert2.min.css}" rel="stylesheet"/>

    <script th:src="@{/back/js/html5shiv.js}"></script>
    <script th:src="@{/back/js/respond.min.js}"></script>
</head>
<div th:fragment="header-body">

    <div class="topbar">
        <div class="topbar-left">
            <div class="text-center p-t-10" style="margin: 0 auto;">
                <div class="pull-left" style="padding-left: 10px;">
                    <span style="font-size: 28px; color: #2f353f; line-height: 50px;">后台管理</span>
                </div>
            </div>
        </div>
        <div class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="">
                    <div class="pull-left">
                        <button type="button" class="button-menu-mobile open-left">
                            <i class="fa fa-bars"></i>
                        </button>
                        <span class="clearfix"></span>
                    </div>

                    <ul class="nav navbar-nav navbar-right pull-right">
                        <form name="logoutform" th:action="@{/logout}" method="post"></form>
                        <li><a th:href="@{${commons.site_url()}}" target="_blank">
                            <i class="fa fa-eye" aria-hidden="true"></i>查看网站</a></li>
                        <li><a href="javascript:document.logoutform.submit();">
                            <i class="fa fa-sign-out"></i> 用户注销</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>


    <div class="left side-menu">
        <div class="sidebar-inner slimscrollleft">
            <div id="sidebar-menu">
                <ul>
                    <li th:class="${active}=='publish'?'active':''">
                        <a th:href="@{/admin/article/toEditPage}"
                           th:class="${active}=='publish'?'waves-effect active':'waves-effect'"><i
                                class="fa fa-pencil-square-o" aria-hidden="true"></i><span> 发布文章 </span></a>
                    </li>
                    <li th:class="${active}=='article'?'active':''">
                        <a th:href="@{/admin/article}"
                           th:class="${active}=='article'?'waves-effect active':'waves-effect'"><i
                                class="fa fa-list" aria-hidden="true"></i><span> 文章管理 </span></a>
                    </li>
                    <li th:class="${active}=='home'?'active':''">
                        <a th:href="@{#}"
                           th:class="${active}=='home'?'waves-effect active':'waves-effect'"><i
                                class="fa fa-dashboard" aria-hidden="true"></i><span> 仪表盘 </span></a>
                    </li>
                </ul>
                <div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>
</html>
